<template>
  <div class="app-container">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="工作量统计" name="first"> <tongji /></el-tab-pane>
      <el-tab-pane label="药历查询" name="second"
        ><yaolichaxunVue
      /></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import yaolichaxunVue from "./components/yaolichaxun.vue";
import tongji from "./components/tongji.vue";
export default {
  name: "tongJiChaXun",
  components: { yaolichaxunVue, tongji },
  data() {
    return {
      activeName: "first",
    };
  },
  computed: {
    role() {
      return this.$store.state.user.roles;
    },
    useInfo() {
      return this.$store.state.user.user;
    },
    info() {
      return this.$store.state.user.search;
    },
  },
  created() {},
  methods: {
    handleClick(tab, event) {
      switch (tab.name) {
        case "second":
          console.log(tab);
          tab.$children[0].getList();
          break;
        default:
          break;
      }
    },
  },
};
</script>
<style scoped lang="scss"></style>
